package com.manshu.manshuweb.common;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.scheduling.annotation.EnableAsync;

import java.util.concurrent.Executor;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

@Configuration
@EnableAsync
public class Haha {
    @Bean(name="nihao")
    public Executor heheda(){
        ThreadPoolExecutor executor=new ThreadPoolExecutor(5,10,0L, TimeUnit.SECONDS,new LinkedBlockingQueue<>(50));
        return executor;
    }
}
